In the below example you can see how the highlighted middle object differs in appearance in a 9.3 client vs. a 9.6 client (DB is 9.3) (column showing is Object Text as it appears in main column). I created the object text contents by combing two text buffers as follows: textBuffer1=richTextWithOleNoCache(o."Object Text") textBuffer2=richTextWithOleNoCache(o."Some Other Attribute") textBuffer1 += "\\par" combine(textBuffer1,textBuffer2,0) o."Object Text"=richText(textBuffer1) Any idea how to make 9.6 respect the added \par to separate into two paragraphs? (I actually discovered the issue when running my modified DOORS export-to-Word script which uses the same code to combine two attributes into one buffer that is then output to Word.)
strathglass - Tue Nov 17 12:49:49 EST 2015 |
Re: 9.6 vs 9.3 Objects differ in appearance Depending on the system you are on with both versions it is possible, that both DOORS clients use a different RTF Editor component. Please note, that taking two RTF documents {\rtf1 ...} and concatenating them with \par does NOT yield a valid RTF document. This error is made by a lot of people, since DOORS has always taken this without complaints and displayed it correctly. Still relying on this behaviour its hard to argue that the display will change between the versions. The correct approach would be to cut the RTF header, append both document bodies and add a new header. Additionally when appending rtf you need to make sure, that after a control word (\\par), you will have a separator! Otherwise your concatenation ill look like this: document 1\\pardocument 2 Regards, Mathias
|
Re: 9.6 vs 9.3 Objects differ in appearance Mathias Mamsch - Tue Nov 17 17:16:12 EST 2015 Depending on the system you are on with both versions it is possible, that both DOORS clients use a different RTF Editor component. Please note, that taking two RTF documents {\rtf1 ...} and concatenating them with \par does NOT yield a valid RTF document. This error is made by a lot of people, since DOORS has always taken this without complaints and displayed it correctly. Still relying on this behaviour its hard to argue that the display will change between the versions. The correct approach would be to cut the RTF header, append both document bodies and add a new header. Additionally when appending rtf you need to make sure, that after a control word (\\par), you will have a separator! Otherwise your concatenation ill look like this: document 1\\pardocument 2 Regards, Mathias
Thanks ... I was afraid that ultimately the solution might require proper parsing of the RTF. So rather than go down that path, I have simply pulled out the plain text paragraphs from each attribute and combined them (with new line separators) into one text buffer that is output to Word. This works well, except of course it loses any rich text formatting, and any embedded OLE content. In our case, these objects should never have any OLE content. And in any event the user is warned if rich text formatting or OLEs are detected.
|